package com.zone.editor.pixel.image;

import android.util.Log;

import java.util.ArrayList;
import java.util.List;

public class ColorItemPool {

    public List<Point> data = new ArrayList<>();

    public List<Point> getData() {
        return data;
    }

    public ColorItemPool(int widthNum, int heightNum) {
        init(widthNum, heightNum);
    }

    public void init(int widthNum, int heightNum) {
//        items = new ColorItem[widthNum][heightNum];
        Log.e("init:", "" + widthNum + "|" + heightNum);
    }

    public void setColorItems(float X, float Y, ColorItem colorItem) {
//        items[X][Y] = colorItem;
        Point point = new Point();
        point.setX(X);
        point.setY(Y);
        point.setColorItem(colorItem);
        data.add(point);
//        Log.e("setColorItems:", "X:" + X + "Y:" + Y);
    }

//    public void removeColorItems(int X, int Y) {
//        items[X][Y] = null;
//    }

//    public ColorItem[][] getColorItems() {
//        return items;
//    }
    public List<Point> getColorData() {
        return data;
    }

    public class Point {

        private float x;
        private float y;
        ColorItem colorItem;

        public float getX() {
            return x;
        }

        public void setX(float x) {
            this.x = x;
        }

        public float getY() {
            return y;
        }

        public void setY(float y) {
            this.y = y;
        }

        public ColorItem getColorItem() {
            return colorItem;
        }

        public void setColorItem(ColorItem colorItem) {
            this.colorItem = colorItem;
        }
    }
}
